#pragma once
#include "HashTable.h"

namespace hash_bucket
{
	template<typename K, typename Hash = HashFunc<K>>
	class unordered_set
	{
		struct KeyOfSet
		{
			const K& operator()(const K& key) {
				return key;
			}
		};
	public:
		typedef typename hash_bucket::HashTable<K, const K, KeyOfSet,Hash>::Iterator iterator;
		typedef typename hash_bucket::HashTable<K, const K, KeyOfSet,Hash>::ConstIterator const_iterator;

		iterator begin()
		{
			return _hs.Begin();
		}
		const_iterator begin() const
		{
			return _hs.Begin();
		}

		iterator end()
		{
			return _hs.End();
		}
		const_iterator end() const
		{
			return _hs.End();
		}

		pair<iterator,bool> insert(const K& Key)
		{
			return _hs.insert(Key);
		}

		bool erase(const K& Key)
		{
			return _hs.erase(Key);
		}

		iterator Find(const K& key)
		{
			return _hs.Find(key);
		}

	private:
		hash_bucket::HashTable<K,const K,KeyOfSet,Hash> _hs;
	};







}
